package com.example.demo.entity;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by pengwan on 2017/7/29.
 */
@Entity
@Table(name = "person")
public class Person extends EntityId {
    @Column(name = "first_name")
    private String firstName;
    @Column(name = "last_name")
    private String lastName;
    @Column(name = "birthday")
    private Date birthday;
    @Embedded
    private Address address;
    @Column(name = "education")
    @Enumerated(EnumType.STRING)
    private EnumEducation education;
    @Column(name = "weight")
    private double weight;
    @Column(name = "active")
    private boolean active;

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public Address getAddress() {
        return address;
    }

    public void setAddress(Address address) {
        this.address = address;
    }

    public EnumEducation getEducation() {
        return education;
    }

    public void setEducation(EnumEducation education) {
        this.education = education;
    }

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public boolean isActive() {
        return active;
    }

    public void setActive(boolean active) {
        this.active = active;
    }
}

